package cn.kduck.web.gmd.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.WidgetCollection;
import gwt.material.design.client.ui.MaterialSideNavDrawer;
import gwt.material.design.client.ui.MaterialSideNavMini;

//http://www.gwtproject.org/doc/latest/DevGuideUiBinder.html
//https://gwtmaterialdesign.github.io/gmd-core-demo/#sidenavs
public class MainPage extends Composite {

    interface MainPageBinder extends UiBinder<Widget, MainPage> {}
    MainPageBinder mainPageUiBinder = GWT.create(MainPageBinder.class);

    @UiField
    MaterialSideNavDrawer sideNav;

    public MainPage() {
        initWidget(mainPageUiBinder.createAndBindUi(this));
        WidgetCollection children = sideNav.getChildren();
        for (Widget child : children) {
            System.out.println(child.getClass());
        }
    }

}
